package io.github.jesse205.dragdrop.pro.content

import android.content.ContentProvider
import android.content.ContentValues
import android.content.UriMatcher
import android.database.Cursor
import android.net.Uri
import android.util.Log

private const val TAG = "DragDropProvider"


class DragDropProvider : ContentProvider() {
    override fun onCreate(): Boolean {
        Log.d(TAG, "onCreate: ")
        // TODO("Not yet implemented")
        return true
    }

    override fun query(
        uri: Uri,
        projection: Array<out String>?,
        selection: String?,
        selectionArgs: Array<out String>?,
        sortOrder: String?
    ): Cursor? {
        TODO("Not yet implemented")
    }

    override fun getType(uri: Uri): String? {
        TODO("Not yet implemented")
    }

    override fun insert(uri: Uri, values: ContentValues?): Uri? {
        TODO("Not yet implemented")
    }

    override fun delete(uri: Uri, selection: String?, selectionArgs: Array<out String>?): Int {
        TODO("Not yet implemented")
    }

    override fun update(
        uri: Uri,
        values: ContentValues?,
        selection: String?,
        selectionArgs: Array<out String>?
    ): Int {
        TODO("Not yet implemented")
    }

    companion object {
        private const val AUTHORITY = "io.github.jesse205.dragdrop.pro.content.dragdropprovider"
        private const val CODE_DRAG_DROP = 1
        private const val PATH_DRAG_DROP = "drag_drop"

        private val uriMatcher = UriMatcher(UriMatcher.NO_MATCH).apply {
            addURI(AUTHORITY, PATH_DRAG_DROP, CODE_DRAG_DROP)
        }
    }
}